

        <g:set var="entityName" value="${message(code: 'teacherEvaluate.label', default: 'TeacherEvaluate')}" />
            <div class="list">
                <table>
                    <thead>
                        <tr>
                        
                            <g:sortableColumn property="attendance" title="${message(code: 'teacherEvaluate.attendance.label', default: 'Attendance')}" />
                        
                            <g:sortableColumn property="obtain" title="${message(code: 'teacherEvaluate.obtain.label', default: 'Obtain')}" />
                        
                            <g:sortableColumn property="expression" title="${message(code: 'teacherEvaluate.expression.label', default: 'Expression')}" />
                        
                            <th><g:message code="teacherEvaluate.teacher.label" default="Teacher" /></th>
                   	    
                            <th><g:message code="teacherEvaluate.postTeacher.label" default="Post Teacher" /></th>
                   	    
                            <g:sortableColumn property="createTime" title="${message(code: 'teacherEvaluate.createTime.label', default: 'Create Time')}" />
                        
                            <th></th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${teacherEvaluateInstanceList}" status="i" var="teacherEvaluateInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                            <%
                                def attendance = teacherEvaluateInstance.attendance.size() > 8?teacherEvaluateInstance.attendance.substring(0,8)+"...":teacherEvaluateInstance.attendance

                                def obtain = teacherEvaluateInstance.obtain.size() > 8?teacherEvaluateInstance.obtain.substring(0,8)+"...":teacherEvaluateInstance.obtain

                                def expression = teacherEvaluateInstance.expression.size() > 8?teacherEvaluateInstance.expression.substring(0,8)+"...":teacherEvaluateInstance.expression
                            %>
                            <td>${attendance}</td>
                        
                            <td>${obtain}</td>
                        
                            <td>${expression}</td>
                        
                            <td>${fieldValue(bean: teacherEvaluateInstance, field: "teacher")}</td>
                        
                            <td>${fieldValue(bean: teacherEvaluateInstance, field: "postTeacher")}</td>
                        
                            <td><g:formatDate date="${teacherEvaluateInstance.createTime}" /></td>
                            <td><g:link action="show" id="${teacherEvaluateInstance?.id}" params="[evaluateFlag:true]">查看评价</g:link></td>

                            
                            <td class="operate">
                            <g:if test="${loggedInUserInfo(field:'id').toString() == teacherEvaluateInstance?.postTeacher?.id?.toString()}">
                            <x:operate width="100">                                
                                <g:if test="${params.evaluateFlag}">
                                    <g:link controller="teacherEvaluate" action="edit" id="${teacherEvaluateInstance.id}" params="[evaluateFlag:true]"><g:message code="default.button.edit.label" default="编辑" /></g:link>
                                    <g:link controller="teacherEvaluate" action="delete" id="${teacherEvaluateInstance.id}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" params="[teacherID:teacherEvaluateInstance.teacher.id,evaluateFlag:true]"><g:message code="default.button.delete.label" default="删除" /></g:link>
                                </g:if>
                                <g:else>
                                    <g:link controller="teacherEvaluate" action="edit" id="${teacherEvaluateInstance.id}"><g:message code="default.button.edit.label" default="编辑" /></g:link>
                                    <g:link controller="teacherEvaluate" action="delete" id="${teacherEvaluateInstance.id}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" params="[teacherID:teacherEvaluateInstance.teacher.id]"><g:message code="default.button.delete.label" default="删除" /></g:link>
                                </g:else>
                            </x:operate>
                            </g:if>
                            </td>
                        
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${teacherEvaluateInstanceTotal}" />
            </div>
